home *** CD-ROM | disk | FTP | other *** search
- %**
- %** The Standard (Letter Size) Preamble File for TIFF Images
- %**
- %** COPYRIGHT (C) 1989, 1990 ALL RIGHTS RESERVED
- %** Driver Design Labs division of Clarendon Datex Ltd.
- %** 2545 Queens Avenue, West Vancouver, BC, CANADA, V7V 2Y9
- %** Voice: 604 925 2555 FAX: 604 926 8182 UUNET: uunet!faximum!info
- %**
- %** WARNING: This file is subject to changes in future versions of the
- %** FAXimum product. Make changes at your own risk. (Send us
- %** the good ones, please.)
- %**
- %**
- %** The following tuning parameters may be adjusted to improve the operation
- %** of tiffps on your particular postscript printer. In particular, the
- %** ..._edge variable define (in points) the edges of the printing area.
- %** They may be redefined to any reasonable value.
- %**
- %**
- %** SccsId = "@(#)standard.ps 1.4 93/02/25"
- %**
-
- /left_edge 25 def
- /bottom_edge 18 def
- /right_edge 598 def
- /top_edge 775 def
-
- %** The following parameters apply to the reduced image mode
-
- /ileft_edge 25 def
- /ibottom_edge 18 def
- /iright_edge 598 def
- /itop_edge 700 def
-
-
- %** The following parameters affect the text printing procedures
-
- /textfont /Courier findfont 9 scalefont def
- /textlead 11 def
- /texttop 750 def
- /textleft 50 def
-
- /headingfont /Helvetica findfont 10 scalefont def
- /headinglead 12 def
- /headingtop 765 def
- /headingleft 50 def
-
- %**
- %** The special %==name value line(s) define parameters that affect the
- %** operation of tiffps itself. (tiffps examines the preamble file as it
- %** is read in and uses the %== to set defaults (which may be overridden
- %** on the command line).
- %**
- %** maxheight
- %** defines the maximum length (in inches) tiff image that should be
- %** put on a single page. Pages longer than this will be broken into
- %** more than one page. Normally it is set to 14.5 so that legal pages
- %** will be printed but anything longer will be split up.
- %**
- %** paperheight
- %** defines the height of the imaging area (top_edge - bottom_edge) in
- %** inches. This defines the size an image larger than maxheight will
- %** be broken down into. If paperheight is larger than the actual
- %** page, then the first n-1 parts of a long page will appear
- %** compressed and the nth (last) part will not (usually).
- %**
- %** As an aside, all comments starting with '%**' are NOT copied by tiffps
- %** into the output stream.
- %**
-
- %==maxheight 14.6
- %==paperheight 10.5
-
- %**
- %** Procedures for text printing
- %**
-
- /starttext
- {
- textfont setfont
- textleft texttop moveto
- } bind def
-
- /printtext
- {
- currentpoint
- 3 -1 roll
- show
- moveto
- 0 textlead neg rmoveto
- } bind def
-
- /endtext
- {
- showpage
- } bind def
-
- %**
- %** Procedures for printing headings
- %**
-
- /startheading
- {
- headingfont setfont
- headingleft headingtop moveto
- } bind def
-
- /heading
- {
- currentpoint
- 3 -1 roll
- show
- moveto
- 0 headinglead neg rmoveto
- } bind def
-
- /endheading
- {
- } bind def
-
-
-
- /s0
- {
- dup 1 sub exch string 0 1 4 -1 roll { exch dup 3 -1 roll 0 put } for
- def
- } bind def
-
- /sf
- {
- dup 1 sub exch string 0 1 4 -1 roll { exch dup 3 -1 roll 255 put } for
- def
- } bind def
-
- /DS 512 string def
-
- /# 1000 sf
- /^ 1000 s0
-
- /gi { # 0 3 -1 roll getinterval def } bind def
- /GI { ^ 0 3 -1 roll getinterval def } bind def
-
- /a 1 gi /b 2 gi /c 3 gi /d 4 gi /e 5 gi
- /f 6 gi /g 7 gi /h 8 gi /i 9 gi
- /j 10 gi /k 20 gi /l 30 gi /m 40 gi /n 50 gi
- /o 60 gi /p 70 gi /q 80 gi /r 90 gi
- /s 100 gi /t 200 gi /u 300 gi /v 400 gi /w 500 gi
- /x 600 gi /y 700 gi /z 800 gi /$ 900 gi
- /A 1 GI /B 2 GI /C 3 GI /D 4 GI /E 5 GI
- /F 6 GI /G 7 GI /H 8 GI /I 9 GI
- /J 10 GI /K 20 GI /L 30 GI /M 40 GI /N 50 GI
- /O 60 GI /P 70 GI /Q 80 GI /R 90 GI
- /S 100 GI /T 200 GI /U 300 GI /V 400 GI /W 500 GI
- /X 600 GI /Y 700 GI /Z 800 GI /@ 900 GI
-
-
- %**
- %** pageinfo takes five arguments from the stack
- %** string: the name of the file from which this image came from
- %** string: the description of this image (from the TIFF directory)
- %** integer: image count - the number of this image in this file
- %** this starts from 1 with every file
- %** integer: page count - the number of this page
- %** this starts from 1 with every print job
- %** integer: part count - the number of page within an image
- %** this starts from 1 with every image and only goes above 1
- %** when printing an image that spans more than one page
- %**
- %** this information is placed into the PostScript data stream by tiffps
- %** to make it possible to add titles and pages numbers to the output...
- %** however, this version of the preamble does not use this information
- %**
- /pageinfo
- {
- pop pop pop pop pop
- } bind def
-
- %** pagesetup takes four arguments from the stack
- %** the width (in pixels) of the image
- %** the horizontal resolution (in pixels per inch)
- %** the height (in pixels) of the image
- %** the vertical resolution (in pixels per inch)
- %**
- /pagesetup
- {
- /vres exch def
- /height exch def
- /hres exch def
- /width exch def
-
- left_edge bottom_edge translate
-
- /pwidth right_edge left_edge sub def
- /pheight top_edge bottom_edge sub def
-
- /iwidth width hres div 72 mul round def
- /iheight height vres div 72 mul round def
-
- iheight pheight lt { 0 pheight iheight sub translate } if
-
- iwidth pwidth le { iwidth } { pwidth } ifelse
- iheight pheight le { iheight } { pheight } ifelse
- scale
-
- width height 1
- width 0 0 height neg 0 height
- 6 array
- astore
- { currentfile DS readline pop cvx exec } bind
- image
- } def
-
- /ipagesetup
- {
- /vres exch 3 mul 2 div def
- /height exch def
- /hres exch 3 mul 2 div def
- /width exch def
-
- left_edge bottom_edge translate
-
- /pwidth iright_edge ileft_edge sub def
- /pheight itop_edge ibottom_edge sub def
-
- /iwidth width hres div 72 mul round def
- /iheight height vres div 72 mul round def
-
- iheight pheight lt { 0 pheight iheight sub translate } if
-
- iwidth pwidth lt { pwidth iwidth sub 2 div 0 translate } if
-
- % draw a box around the image
-
- /bheight iheight pheight lt { iheight } { pheight } ifelse def
-
- 0.2 setlinewidth
- newpath
- -1 -1 moveto
- -1 bheight 1 add lineto
- iwidth 1 add bheight 1 add lineto
- iwidth 1 add -1 lineto
- closepath
- stroke
-
- iwidth pwidth le { iwidth } { pwidth } ifelse
- iheight pheight le { iheight } { pheight } ifelse
- scale
-
-
- width height 1
- width 0 0 height neg 0 height
- 6 array
- astore
- { currentfile DS readline pop cvx exec } bind
- image
- } def
-